#ifndef FILETABLEDELEGATE_H
#define FILETABLEDELEGATE_H

#include <QtGui/QItemDelegate>
#include "Portability.h"

class QRect;
class QTableView;
class FileTableDelegate : public QItemDelegate
{
	Q_OBJECT

public:
	FileTableDelegate(QTableView*,QObject *parent=0);
	virtual ~FileTableDelegate();

	virtual void paint ( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const override;

private:
	QRect getImageRect(const QRect& cellRect,const QRect& imageRect) const;
	QTableView* _tableView;
};

#endif // FILETABLEDELEGATE_H
